package cn.wolfcode.luowowo.comment.domain;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 景点评论
 */
@Setter
@Getter
@ToString
@Document("scenic_comment") //文档所在集合
public class ScenicComment implements Serializable{
    public static final int SCENIC_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int SCENIC_COMMENT_TYPE = 1; //评论的评论

    @Id
    private String id; //spring-data默认封装成 ObjectId

    private  Long scenicId;  //当前景点id;

    private int rank; //总体评价星星数

    private String comment;  //评论内容

    private String commentUrl; //评论图片

    private Date createTime; //评论创建时间;

    private Long userId;    //用户id
    private String username; //用户名
    private String city;
    private int level;
    private String headUrl;   // 用户头像

    private int thumbupnum; //点赞数

    private List<Long> thumbuplist = new ArrayList<>();//点赞用户合集.

    private int type = SCENIC_COMMENT_TYPE_COMMENT; //评论类别

    private List<ScenicComment> comments =new ArrayList<>() ; //评论的评论



}
